Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
DisableEvents Method
See Also 
Leadtools Namespace > Generic RasterCollection Class : DisableEvents Method




Called to disable raising the ItemAdded and ItemRemoved events.

Syntax

Visual Basic (Declaration) 
Public Sub DisableEvents() 
Visual Basic (Usage)Copy Code
Dim instance As RasterCollection(Of T)
 
instance.DisableEvents()
C# 
public void DisableEvents()
Managed Extensions for C++ 
public: void DisableEvents(); 
C++/CLI 
public:
void DisableEvents(); 

Example

For an example, refer to Generic RasterCollection.

Remarks

Calling DisableEvents will increment an internal counter. When the internal counter is 0, ItemAdded or ItemRemoved event will be raised when items are added or removed to/from this Generic RasterCollection.

When the internal counter is not 0, ItemAdded and ItemRemoved events will not be raised. Therefore, for each call to DisableEvents, there should be a corresponding call to EnableEvents in order to restore the raising of events.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also